﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Followers.aspx.cs" Inherits="CPETwit.Web.Pages.Followers" %>

<%@ Import Namespace="CPETwit.Web.Service.Interface" %>
<%@ Import Namespace="CPETwit.Web.Service.Implementation" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html data-nav-highlight-class-name="highlight-global-nav-home">
<head id="Head1" runat="server">
    <title>CPE Tweet - Liste des abonnements</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="res/css/t1_core_no_hovers.bundle.css" type="text/css"
        media="screen">
    <link rel="stylesheet" href="res/css/t1_more_no_hovers.bundle.css" type="text/css"
        media="screen">
    <link rel="stylesheet" href="res/css/t1_core.css" type="text/css" media="screen">
    <link rel="stylesheet" href="res/css/js-user-style.css" type="text/css" media="screen">
    <script type="text/javascript" src="res/js/head_logged_out.js"></script>
    <script type="text/javascript" src="res/js/jquery-1.7.1.min.js"></script>
</head>
<%@ import namespace="CPETwit.Data.Entity" %>
<% 
    /* Traitement du design
     * Sexe masculin => design bleu, 
     * féminin => design rose 
     */
    switch (((User)Session["login"]).sex)
    {
        case "M":
            Response.Write("<body class='body-male'>");
            break;
        case "F":
            Response.Write("<body class='body-female'>");
            break;
    }
%>
<form id="form1" runat="server">
<div id="doc">
    <div class="topbar js-topbar">
        <div id="banners" class="js-banners">
            <noscript>
                <div class="banner-outer">
                    <div class="banner">
                        <div class="banner-inside noscript-warning">
                            <h5>
                                CPE Tweet fait un usage intensif de JavaScript.</h5>
                            <span class="warning">Si vous ne pouvez pas l'activer dans les préférences de votre
                                navigateur, vous pourriez avoir une meilleure expérience sur notre <a href="http://m.twitter.com">
                                    site mobile</a>.</span>
                        </div>
                    </div>
                </div>
            </noscript>
            <div class="banner-outer" id="slow-load-banner">
                <div class="banner">
                    <div class="banner-inside slow-warning">
                        <h5>
                            CPE Tweet se charge lentement.</h5>
                        <span class="warning">Hum, il semblerait que cela prenne un certain temps. Si les problèmes
                            persistent, <a href="javascript:window.location.reload(true);">rafraichissez la page</a>
                            ou réessayez.</span>
                    </div>
                </div>
            </div>
        </div>
        <div class="global-nav" data-section-term="top_nav">
            <div class="global-nav-inner">
                <div class="container">
                    <ul class="nav js-global-actions" id="global-actions">
                        <li id="global-nav-home" class="home" data-global-action="home"><a class="js-hover"
                            href="timeline.aspx" data-component-term="home_nav"><span class="new-wrapper"><i
                                class="nav-home"></i><i class="nav-new"></i></span>Accueil </a></li>
                        <li class="people" data-global-action="connect"><a class="js-hover" href="following.aspx"
                            data-component-term="connect_nav"><span class="new-wrapper"><i class="nav-people"></i>
                                <i class="nav-new"></i></span>Connecter </a></li>
                        <li class="people" data-global-action="connect"><a class="js-hover" href="profil.aspx"
                            data-component-term="connect_nav"><span class="new-wrapper"><i class="nav-me"></i><i
                                class="nav-new"></i></span>Profil </a></li>
                        <li class="people" data-global-action="connect"><a class="js-hover" href="apropos.aspx"
                            data-component-term="connect_nav"><span class="new-wrapper"><i class="nav-topics"></i>
                                <i class="nav-new"></i></span>A Propos </a></li>
                    </ul>
                    <i class="cpetweet-topbar"></i>
                </div>
            </div>
        </div>
        <div class="alert-messages" id="message-drawer">
        </div>
    </div>
    <div id="page-outer">
        <div id="page-container" class="wrapper">
            <div id="page-node-home">
                <div class="dashboard">
                    <div class="module mini-profile">
                        <div class="flex-module profile-summary js-profile-summary">
                            <a href="profil.aspx" class="account-summary account-summary-small">
                                <div class="content">
                                    <div class="account-group js-mini-current-user">
                                        <%
                                        if (((User)Session["login"]).avatar != null)
                                        {
                                            /* Avatar de l'utilisateur */
                                            Response.Write("<img class='avatar size32' id='avatar_preview' src='ImgHandler.ashx?login=" + ((User)Session["login"]).login + "' />");
                                        }
                                        else
                                        {
                                            /* Avatar par défaut */
                                            Response.Write("<img class='avatar size32' id='avatar_preview' src='res/img/hf32.png' />");
                                        }
                                        
                                         %>
                                        <b class="fullname">
                                            <% Response.Write(((User)Session["login"]).name); %></b> <small class="metadata">Voir
                                                ma page de profil</small>
                                    </div>
                                </div>
                            </a>
                        </div>
                    </div>
                    <div class="component" data-component-term="footer">
                        <div class="module site-footer ">
                            <div class="flex-module">
                                <div class="flex-module-inner js-items-container">
                                    <ul class="clearfix">
                                        <li class="copyright">&copy; 2012 CPE Tweet by CPE School. See "A Propos" section for
                                            more details. </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="content-main js-content-main breakable">
                    <div id="js-promptbird-below-black-bar-hook">
                    </div>
                    <div id="js-empty-timeline-recommendations-module-hook">
                    </div>
                    <div class="content-header js-stream-header">
                        <div class="header-inner">
                            <h2>
                                <span class="content-header-buttons js-header-button-container"></span><span class="js-stream-title">
                                    Les personnes abonnées à vous</span> <small class="view-toggler js-view-toggler">
                                </small>
                            </h2>
                        </div>
                    </div>
                    <div class="stream js-stream-manager-container">
                        <div id="profile-stream-manager" class="js-stream-manager">
                            <div class="stream-title">
                            </div>
                            <div class="stream-container">
                                <div class="stream" data-component-term="stream">
                                    <div id="stream-items-id" class="js-stream-items stream-items">
                                        <!-- DEBUT TEMPLATE ABONNE -->
                                        <asp:listview id="ListViewFollowers" runat="server" datasourceid="ObjectDataSourceFollowers"
                                            onitemcreated="ListViewFollowers_ic">
                                            <EmptyDataTemplate>
                                                <div class="js-stream-item stream-item stream-item expanding-stream-item">
                                                    <span class="metadata">Pas encore d'abonnés l'ami !</span>
                                                </div>
                                            </EmptyDataTemplate>
                                            <ItemTemplate>
                                                <div data-item-type="user" class="js-stream-item stream-item stream-item">
                                                    <div class="account js-actionable-user js-profile-popup-actionable ">
                                                        <!-- DEBUT CHOIX BUTTON -->
                                                        <asp:Panel runat="server" id='FollowTypeButton' onload="FollowTypeDiv_Load" CssClass="js-follow-combo follow-combo btn-group js-actionable-user following">
                                                        <!-- FIN CHOIX BUTTON -->
                                                            <!--<asp:LinkButton name="FollowLinkButton" runat="server" CssClass="follow-btn btn js-combo-btn js-recommended-item" onClick="FollowLinkButton_Click" CommandArgument='<%#Eval("login")%>'>
                                                                <div class="js-action-follow follow-text action-text">S'abonner</div>
                                                                <div class="following-text action-text">Abonné</div>
                                                                <div class="js-action-unfollow unfollow-text action-text">Se désabonner</div>
                                                            </asp:LinkButton>-->
                                                        </asp:Panel>
                                                        <div class="content">
                                                            <div class="stream-item-header">
                                                                <a href='profil.aspx?login=<%# Eval("login") %>' class="account-group js-user-profile-link">
                                                                    <img id="DefaultAvatarImg" src="res/img/hf48.png" class="avatar js-action-profile-avatar" runat="server" visible='<%# Eval("avatar") == null ? true : false %>'>
                                                                    <img id="AvatarImg" class="avatar js-action-profile-avatar" src='<%# "ImgHandler.ashx?login=" + Eval("login") %>' runat="server" visible='<%# (Eval("avatar") != null ) ? true : false %>' />
                                                                    <strong class="fullname js-action-profile-name"><%# Eval("name") %></strong>
                                                                    <span class="username js-action-profile-name">@<%# Eval("login") %></span></a>
                                                            </div>
                                                            <p class="bio"><%# Eval("description") %></p>
                                                        </div>
                                                    </div>
                                    </div>
                                    </ItemTemplate>
                                    <layouttemplate>
                                            <div id="itemPlaceholderContainer" runat="server" style="">
                                                <span runat="server" id="itemPlaceholder" />
                                            </div>
                                        </layouttemplate>
                                    </asp:listview>
                                        <div class="component" data-component-term="stream_end">
                                            <div class="stream-end">
                                                <div class="stream-end-inner">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!-- FIN TEMPLATE ABONNE -->
                                    <asp:objectdatasource id="ObjectDataSourceFollowers" runat="server" selectmethod="GetFollowers"
                                        typename="CPETwit.Web.Service.Implementation.TwitterService">
                                        <SelectParameters>
                                            <asp:SessionParameter Name="user" SessionField="login" Type="Object" />
                                        </SelectParameters>
                                    </asp:objectdatasource>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="twttr-dialog-wrapper">
    </div>
</form>
</body>
</html>
